<extend name="Public/base"/>
<block name="title">用户管理</block>
<block name="location">用户列表</block>
<block name="css"></block>
<block name="content">
  <table id="simple-table" class="table  table-bordered table-hover">
    <thead>
    <tr>
      <th class="detail-col">#</th>
      <th>昵称</th>
      <th>电话</th>
      <th>性别</th>
      <th>问卷调查时间</th>
      <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <volist name="data" id="item" key="k">
      <tr>
        <td class="center">{$k}</td>
        <td>{$item.nikename}</td>
        <td>{$item.tel}</td>
        <td>{$item.sex}</td>
        <td>{$item.addtime|date='Y-m-d H:i:s',###}</td>
        <td>
          <div class="hidden-sm hidden-xs btn-group">
            <a class="btn btn-xs btn-info" href="{:U('edit','id='.$item['id'])}">编辑</a>
            <input type="button" class="btn btn-xs btn-danger" onclick="deleteItem('{$item.id}')" value="删除"/>
          </div>
        </td>
      </tr>
    </volist>
    </tbody>
  </table>
  <div class="row">
    <div class="col-xs-12">
      <div class="dataTables_paginate paging_simple_numbers pages" id="dynamic-table_paginate">
        {$page}
      </div>
    </div>
  </div>
</block>
<block name="js">
  <script>
    function deleteItem(id) {
      if (window.confirm('确定要删除吗？')) {
        location.href = "/User/del/id/"+id;
      }
    }
  </script>
</block>
